package cn.tide.question2.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("")
public class Question8 {

    @RequestMapping("/q8")
    @ResponseBody
    public Object q8(int num){
//        ModelAndView mv = new ModelAndView();
        System.out.println("date="+num);
        int data = num+1;

//        String res = "日期是："+date;
//        String rel = "tuuuuu";
//        mv.addObject("result",res);
//        mv.getModel().put("real",rel);
//        request.setAttribute("ys",res);
//        mv.setViewName("redirect:/html/question8.html");
        return data;
//        return "redirect:/html/question8.html";
    }

}
